import { ColumnGroupType, ColumnType } from "antd/es/table"

const creditLineFastChargingConfigTable = (
	newFormat: (arg: string) => string
): Record<string, ColumnGroupType<any> | ColumnType<any>> => ({
	username: {
		key: "username",
		align: "center",
		dataIndex: "username",
		title: newFormat("funds.operation.agent_account"),
		width: 200,
		render: (sort: number) => <span>{sort}</span>
	},
	parentUsername: {
		key: "parentUsername",
		align: "center",
		dataIndex: "parentUsername",
		title: newFormat("funds.operation.direct_supervisor"),
		width: 200,
		render: (parentUsername: number) => <span>{parentUsername || "-"}</span>
	},
	topUsername: {
		key: "topUsername",
		align: "center",
		dataIndex: "topUsername",
		title: newFormat("funds.operation.general_agent"),
		width: 200,
		render: (topUsername: number) => <span>{topUsername || "-"}</span>
	},
	merchantName: {
		key: "merchantName",
		align: "center",
		dataIndex: "merchantName",
		title: newFormat("funds.operation.merchant"),
		width: 200,
		render: (merchantName: number) => <span>{merchantName || "-"}</span>
	},
	businessModel: {
		key: "businessModel",
		align: "center",
		dataIndex: "businessModel",
		title: newFormat("funds.operation.business_model"),
		width: 200,
		render: (businessModel: number) => <span>{businessModel || "-"}</span>
	},
	memberDeposit: {
		key: "memberDeposit",
		align: "center",
		dataIndex: "memberDeposit",
		title: newFormat("funds.operation.member_recharge"),
		width: 200
	},
	memberWithdraw: {
		key: "memberWithdraw",
		align: "center",
		dataIndex: "memberWithdraw",
		title: newFormat("funds.operation.member_withdraw"),
		width: 200
	},
	proxyDeposit: {
		key: "proxyDeposit",
		align: "center",
		dataIndex: "proxyDeposit",
		title: newFormat("funds.operation.agent_recharge"),
		width: 200
	},
	proxyWithdraw: {
		key: "proxyWithdraw",
		align: "center",
		dataIndex: "proxyWithdraw",
		title: newFormat("funds.operation.agent_withdraw"),
		width: 200
	},
	creator: {
		key: "creator",
		align: "center",
		dataIndex: "creator",
		title: newFormat("funds.operation.creator"),
		width: 200,
		render: (creator: string | number) => <span>{creator || "-"}</span>
	},
	createdAt: {
		key: "createdAt",
		align: "center",
		dataIndex: "createdAt",
		title: newFormat("funds.operation.creation_time"),
		width: 200,
		render: (createdAt: string | number) => <span>{createdAt || "-"}</span>
	},
	operator: {
		key: "operator",
		align: "center",
		dataIndex: "operator",
		title: newFormat("funds.operation.last_operator"),
		width: 200,
		render: (operator: string | number) => <span>{operator || "-"}</span>
	},
	updatedAt: {
		key: "updatedAt",
		align: "center",
		dataIndex: "updatedAt",
		title: newFormat("funds.operation.last_operation_time"),
		width: 200,
		render: (updatedAt: string | number) => <span>{updatedAt || "-"}</span>
	},
	operation: {
		key: "operation",
		align: "center",
		dataIndex: "action",
		fixed: "right",
		title: newFormat("funds.operation.operation"),
		width: 200
	}
})
export default creditLineFastChargingConfigTable
